<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>修改记录</title>
    <!--公用样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/comment.css"/>
    <!--页面样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/style.css"/>
    <!--Layui-->
    <link rel="stylesheet" href="${re.contextPath}/plugin/layui/css/layui.css" media="all"/>
    <!--页面样式-->
    <link rel="stylesheet" type="text/css" href="${re.contextPath}/plugin/common/css/extended.css"/>
    <!--JQ-->
    <script type="text/javascript" charset="utf-8"
            src="${re.contextPath}/plugin/common/js/jquery-1.8.3.min.js"></script>
    <!--Layui-->
    <script type="text/javascript" src="${re.contextPath}/plugin/layui/layui.js" charset="utf-8"></script>
    <!--公用样式JS-->
    <script type="text/javascript" src="${re.contextPath}/plugin/common/js/comment.js" charset="utf-8"></script>
    <style>
        .layui-laypage-limits>select{
            width: 100% !important;
        }
    </style>
</head>

<body>
<!--容器-->

<div class="container index clearfix">
    <!--右侧内容-->
    <div class="Right fr" style="width: 100%;">

        <div  lay-filter="docDemoTabBrief" style="margin-top: 12px;">
            <div class="return">
                <img class="close" src="${re.contextPath}/plugin/common/images/32@2x.png" alt=""/>
                <span class="close">返回上一页</span>
            </div>
            <div class=" whitebg layui-row" style="  padding-left: 50px ;margin: 20px 31px;;">
                    <ul class="clearfix whitebg" style="padding-top: 10px;padding-bottom: 80px;">
                        <li class="clearfix">
                            <label class="fl" style="width: 70px;">项目类型:</label>
                            <span class="ml10" >${strprojecttype}</span>
                        </li>
                        <li class="clearfix">
                            <label class="fl" style="width: 70px;">项目名称:</label>
                            <span  class="ml10"  >${project.projectName}</span>
                        </li>
                        <li class="clearfix">
                            <label class="fl" style="width: 70px;">变更标题:</label>
                            <span   class="ml10" >${change.title}</span>
                        </li>
                        <li class="clearfix">
                            <label class="fl "style="width: 70px;">发布单位:
                            </label>
                            <span  class="ml10" >${companyName}</span>
                        </li>
                        <li class="clearfix">
                            <label class="fl "style="width: 70px;">发布人:
                            </label>
                            <#if "${user.realName}"=="" ||  "${user.realName}"==null>
                                <span  class="ml10" >${user.username}</span>
                            <#else >
                                <span  class="ml10" >${user.realName}</span>
                            </#if>

                        </li>
                        <li class="clearfix" >
                            <label class="fl" style="width: 70px;">变更时间:</label>
                            <span  class="ml10" >${change.changeDate}</span>
                        </li>
                        <li class="clearfix">
                            <label class="fl"  style="width: 70px;">变更内容:</label>
                            <div class="layui-col-md12">
                            <table id="modrecord" lay-filter="modrecord"></table>
                            </div>
                        </li>
                    </ul>
            </div>
        </div>
    </div>
</div>
<script type="text/html" id="toolBar">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看详情</a>
</script>

<script>
    function showDetail() {
        var projectName='${project.projectName}';
        var id='${project.supProjectId}';
        window.parent._showtab('xm_v' + id, '查看-' +projectName, '/supplier/projectManager/projectDetail?type=v&supProjectId=' +id);
    }
    $('.close').click(function () {
        var index = parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);
    });
    var layer;
    var tableIns;
    $(function () {
        layui.use(['table'], function () {
            table = layui.table;
            //方法级渲染
            tableIns = table.render({
                id: 'modrecord',
                elem: '#modrecord',
                url: '/supervisor/projectManager/gerRecordList?spId='+'${supProjectChangeId}',
                page: true,
                parseData: function(res){
                    if(res && res.length >= 0){
                        return {
                            "code": 0,
                            "msg": "加载成功",
                            "count": res.length,
                            "data":res
                        }
                    }
                },
                cols: [[
                    {title: '序号',width: '10%', align:'center', templet: function (res) {
                            return res.LAY_INDEX;
                        }},
            /*        {title: '类型', field: 'spmrAction', width: '10%', sort: false},*/
                    {title: '修改内容', field: 'spFieldName', width: '30%',align:'center', sort: false},
                    {title: '变更前', field: 'oldValue', width: '30%', align:'center',sort: false},
                    {title: '变更后', field: 'newValue', width: '30%', align:'center',sort: false}
                ]],
            });
        })
    })
</script>
</body>
</html>